<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <h1>点赞系统</h1>
    <table border="1">
        <tr>
            <td>Id</td>
            <td>节假日名</td>
            <td>点赞数</td>
            <td>操作</td>
        </tr>
        <!-- 把data循环引入 -->
        {% for i in data %}
        <tr>
            <td>{{i.id}}</td>
            <td>{{i.name}}</td>
            <td>{{i.num}}</td>
            <!-- 是否执行upvote函数了（参数是"id=这个数字"给谁点赞了） -->
            <td><a href="/upvote?id={{i.id}}">点赞</a></td>
        </tr>
        {% endfor %}
    </table>
</body>

</html>